package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.bean.*;

import java.util.List;

@Mapper
public interface ModulesMapper {
    List<Modules> findModules(Integer m_id);

    List<ModuleList> findAll();

    List<Product> findAllProduct();

    List<Supplier> findAllSupplier();

    void addModuleList(String mName);

    Integer getId();

    boolean addModules(@Param("mId") Integer mId,@Param("supplier") String supplier,
                       @Param("breed") String breed,@Param("finalist") Integer finalist,@Param("nowFix") Integer nowFix);

    Integer delModules(Integer mId);

    Integer delList(Integer mId);


    List<Ship> shopAll();

    Integer ordersAll(@Param("orders") Orders orders,@Param("oNumber") String oNumber);

    Integer getMId(String oNumber);

    Integer addSup(@Param("sup") Sup sup);

    List<Sup> supSer(Integer oId);

    Integer addOD(@Param("oId") Integer oId,@Param("breed") String breed,@Param("price") Integer price,
                  @Param("purchaseQuantity") Integer purchaseQuantity);

    List<OrderDetailed> OrderDetailedId(Integer oId);

    boolean updateODPrice(@Param("oId") Integer oId,@Param("breed") String breed,@Param("price") Integer price);

    void deleteO(Integer oId);

    Integer deleteS(Integer oId);
}
